// 引入鉴权路由
import AuthRoute from 'components/AuthRoute';
import React, { Component } from 'react';
import { Router, Route, Switch } from 'react-router-dom';

import Layouts from './pages/Layout';
import Login from './pages/Login';
import Text from './pages/TextPage';

import history from 'utils/history';

export default class App extends Component {
  render() {
    return (
      <Router history={history}>
        <Switch>
          <Route path="/login" component={Login}></Route>
          <Route path="/text" component={Text}></Route>
          <AuthRoute path="/" component={Layouts}></AuthRoute>
        </Switch>
      </Router>
    );
  }
}
